<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .min {
      position: relative;
      width: 400px;
      height: 330px;
      margin-top: 10px;
      border: 1px #ccc solid;

    }

    .ps {
      display: flex;
      flex-wrap: wrap;
      height: 260px;
      overflow: auto;
    }

    .ps p {
      margin-left: 10px;
      background-color: #ccc;
      border-radius: 25%;
      cursor: pointer;
    }

    .select {
      background-color: yellow !important;
    }

    input.el-input__inner {
      text-align: center;
    }
  </style>
</head>

<body>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  <!-- 引入样式 -->
  <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  <!-- 引入组件库 -->
  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  <div id="app">
    <template>
      <el-table ref="multipleTable" :data="tableData" @select="handleSelect" tooltip-effect="dark" style="width: 100%">
        <el-table-column type="selection" width="55">
        </el-table-column>
        <el-table-column label="日期" width="120">
          <template slot-scope="scope">{{ scope.row.date }}</template>
        </el-table-column>
        <el-table-column prop="name" label="姓名" width="120">
        </el-table-column>
        <el-table-column prop="address" label="地址" show-overflow-tooltip>
        </el-table-column>
      </el-table>
      <div style="margin-top: 20px">
        <el-button @click="toggleSelection([tableData[1]])">切换第二、第三行的选中状态</el-button>
        <el-button @click="toggleSelection()">取消选择</el-button>
      </div>
    </template>
  </div>
  </div>
  <script>

    var app = new Vue({
      el: '#app',
      data: {
        tableData: [{
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        },]
      },
      created () {

      },
      mounted () {

      },
      watch: {

      },
      methods: {


        handleSelect (data, row) {
          console.log('data: ', data[0] === this.tableData[0]);
            
        },



      }
    }
    )
  </script>


</body>

</html>